<template>
<div class="doorItem" @click="link(item.url,item.query)">
  <div class="iconBox">
    <i :class="['iconfont',item.icon]"></i>
  </div>
  <span class="title">{{ item.name }}</span>
</div>
</template>

<script>
export default {
  name: "doorItem",
  computed:{
    isLogin(){
      return this.$store.getters.isLogin
    },
  },
  props:{
    item:{}
  },
  methods:{
    link(url,query){
      if(!this.isLogin){
        this.$router.push({name:'login'})
        return
      }
      this.$router.push({
        name:url,
        query:{
          scdType: query
        }
      })
      
      //this.$router.push({name:'noPermission2'})
    }
  }
}
</script>

<style scoped lang="less">
.doorItem{
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  .iconBox{
    width: 80px;
    height: 80px;
    background: #FFFFFF;
    border: 1px solid #EEEEEE;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    i{
      font-size: 40px;
      color: #0F47B8;
    }
  }
  .title{
    margin-top: 10px;
    font-size: 12px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    color: #444444;
  }
}

</style>